<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>产品类别管理</title>
</head>

<script type="text/javascript"
	src="${pageContext.request.contextPath }/assets/js/jquery-1.9.1.js"></script>
	<script type="text/javascript"
	src="${pageContext.request.contextPath }/assets/js/angular.min.js"></script>


<script type="text/javascript">
	$(document).ready(function(){
		$("#addBtn").click(function(){
			var url =  "${pageContext.request.contextPath}/producttype/addProducttype.do"
			var data = {productTypeName:$("#productTypeName").val()};
			$.post(url,data,function(resp){
				alert(JSON.stringify(resp));
			},'json');
		});
		
		$("#getBtn").click(function(){
			var url =  "${pageContext.request.contextPath}/producttype/listProducttype.do"
			var data = {isDeleted:0};
			$.post(url,data,function(resp){
				alert(JSON.stringify(resp));
			},'json');
		});
		
		
	});
	
</script>
<body ng-app="productTypeCtrl">
	<h3>产品类别添加</h3>
		类别名称<input id="productTypeName"> <br> <input id="addBtn"
			type="button" value="添加">
			<input id="getBtn"
			type="button" value="获取所有类别">
</body>
</html>